/ Assembly List / LJCNetCommon / LJCAssemblyReflect / GetMethodSyntax

Namespace - LJCNetCommon


Parameters
methodInfo - The MethodInfo object.

Returns

The Method syntax.

Syntax

C#
public String GetMethodSyntax(MethodInfo methodInfo = null)

Creates and returns the Method syntax. (E)

Example

C#
using System;
using System.Reflection;
using LJC.Net.Common;

public string RetrieveMethodSyntax(string assemblyFileSpec, string fullTypeName
  , string methodName, string[] parameterNames)
{
  string retValue = null;

  // These calls are not required if an LJCAssemblyReflect reference is
  // used and the the following set methods have already been executed.
  LJCAssemblyReflect assemblyReflect = new LJCAssemblyReflect();
  assemblyReflect.SetAssembly(assemblyFileSpec);
  assemblyReflect.SetTypeReference(fullTypeName);
  assemblyReflect.SetMethodInfo(methodName, parameterNames);
    
  retValue = assemblyReflect.GetMethodSyntax();
  return retValue;
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.